extends layout

block content

    each text in texts
        div.panel.panel-default
            div.panel-body
                a(href='/Articles/#{a_id}/#{text.ID}/delete' style="float: right; margin-top: -15px; margin-bottom: 10px;") 
                    span.glyphicon.glyphicon-trash
                a(href="/Participations/#{text.PARTICIPATION_ID}") Participants
                form.form-horizontal(method="post" action="/Articles/#{a_id}/#{text.ID}/update")
                    div.form-group
                        label.col-sm-2.control-label Title:
                        div.col-sm-10: input.form-control(type="text" value="#{text.TITLE}" name="title")
                    div.form-group
                        label.col-sm-2.control-label Locale:
                        div.col-sm-10: input.form-control(type="text" value="#{text.CODE}" name="locale")
                    div.form-group
                        label.col-sm-2.control-label Text:
                        div.col-sm-10: textarea.form-control(rows="10" name="text")= text.TEXT
                    div.form-group 
                        div.col-sm-offset-2.col-sm-10: button.btn.btn-primary(type="submit") Save

    div.panel.panel-default
        div.panel-body
            form.form-horizontal(method="post" action="/Articles/#{a_id}/create")
                div.form-group
                    label.col-sm-2.control-label Title:
                    div.col-sm-10: input.form-control(type="text" name="title")
                div.form-group
                    label.col-sm-2.control-label Locale:
                    div.col-sm-10: input.form-control(type="text" name="locale")
                div.form-group
                    label.col-sm-2.control-label Text:
                    div.col-sm-10: textarea.form-control(rows="10" name="text")
                div.form-group 
                    div.col-sm-offset-2.col-sm-10: button.btn.btn-primary(type="submit") Create